<?php
defined('IN_PHPCMS') or exit('No permission resources.');
pc_base::load_sys_class('model', '', 0);
class linkage_model extends model {
	public function __construct() {
		$this->db_config = pc_base::load_config('database');
		$this->db_setting = 'default';
		$this->table_name = 'linkage';
		parent::__construct();
	}

	/**
	 * 取省份、城市
	 */
	public function getCity ($parentid)
	{
		$where = array();
		$where['style'] = 0;
		$where['parentid'] = $parentid;
		$list = $this->select($where);
		$data = array();
		foreach ($list as $v) {
			$data[$v['name']] = $v['name'];
		}
		return $data;
	}
}
?>